<!DOCTYPE html>
<html lang="zh" xmlns:th="http://www.thymeleaf.org">
<head>
    <th:block th:include="include :: header('修改设备仓库信息')"/>
    <th:block th:include="include :: select2-css"/>
</head>
<body>
<div class="main-content">
    <form class="form-horizontal" id="form-user-edit" th:object="${cargo_space}">
        <h4 class="form-header h4">设备库房信息</h4>
        <div class="row">
            <div class="col-sm-6">
                <div class="form-group">
                    <label class="col-sm-4 control-label is-required">货位id：</label>
                    <div class="col-sm-8">
                        <input name="cargo_space_id"th:field="*{cargo_space_id}" placeholder="请输入货位id" class="form-control" type="text" readonly maxlength="30" required>
                    </div>
                </div>
            </div>
            <div class="col-sm-6">
                <div class="form-group">
                    <label class="col-sm-4 control-label is-required">仓库id：</label>
                    <div class="col-sm-8">
                        <input name="warehouse_id"th:field="*{warehouse_id}" id="warehouse_id" type="text" placeholder="请选择仓库" readonly class="form-control" required>
                    </div>
                </div>
            </div>
        </div><div class="row">
        <div class="col-sm-6">
            <div class="form-group">
                <label class="col-sm-4 control-label ">巷道id：</label>
                <div class="col-sm-8">
                    <input name="roadway_id" th:field="*{roadway_id}" placeholder="请输巷道区id" class="form-control" type="text" readonly maxlength="30" >
                </div>
            </div>
        </div>
        <div class="col-sm-6">
            <div class="form-group">
                <label class="col-sm-4 control-label">货区id：</label>
                <div class="col-sm-8">
                    <input name="cargo_area_id" th:field="*{cargo_area_id}" id="cargo_area_id" type="text" placeholder="请选择归属部门" class="form-control">
                </div>
            </div>
        </div>
    </div><div class="row">
        <div class="col-sm-6">
            <div class="form-group">
                <label class="col-sm-4 control-label ">货位类型：</label>
                <div class="col-sm-8">
                    <input name="the_type"th:field="*{the_type}" placeholder="请输入货位类型" class="form-control" type="text" maxlength="30" >
                </div>
            </div>
        </div>
        <div class="col-sm-6">
            <div class="form-group">
                <label class="col-sm-4 control-label">货位类型名称：</label>
                <div class="col-sm-8">
                    <input name="the_type_name"th:field="*{the_type_name}" id="the_type_name" type="text" placeholder="请输入货位类型名称" class="form-control">
                </div>
            </div>
        </div>
    </div><div class="row">
        <div class="col-sm-6">
            <div class="form-group">
                <label class="col-sm-4 control-label">货位名称：</label>
                <div class="col-sm-8">
                    <input name="cargo_space_name"th:field="*{cargo_space_name}" placeholder="请输入货位名称" class="form-control" readonly type="text" maxlength="30">
                </div>
            </div>
        </div>
        <div class="col-sm-6">
            <div class="form-group">
                <label class="col-sm-4 control-label ">托盘条码：</label>
                <div class="col-sm-8">
                    <input name="tray_code"th:field="*{tray_code}" placeholder="请输入托盘条码" class="form-control" type="text" maxlength="30" >
                </div>
            </div>
        </div>

    </div><div class="row">
        <div class="col-sm-6">
            <div class="form-group">
                <label class="col-sm-4 control-label is-required">排：</label>
                <div class="col-sm-8">
                    <input name="the_platoon"th:field="*{the_platoon}" id="the_platoon" type="text" placeholder="请选择归属部门" readonly class="form-control" required>
                </div>
            </div>
        </div>
        <div class="col-sm-6">
            <div class="form-group">
                <label class="col-sm-4 control-label is-required">列：</label>
                <div class="col-sm-8">
                    <input name="the_column"th:field="*{the_column}" placeholder="请选择列" class="form-control" type="text" readonly maxlength="30" required>
                </div>
            </div>
        </div>

    </div><div class="row">
        <div class="col-sm-6">
            <div class="form-group">
                <label class="col-sm-4 control-label is-required">层：</label>
                <div class="col-sm-8">
                    <input name="the_floor" th:field="*{the_floor}"id="the_floor" type="text" placeholder="请选择层" readonly  class="form-control" required>
                </div>
            </div>
        </div>
        <div class="col-sm-6">
            <div class="form-group">
                <label class="col-sm-4 control-label ">货位高度：</label>
                <div class="col-sm-8">
                    <input name="cargo_hight"th:field="*{cargo_hight}" placeholder="请输入货位高度" class="form-control" type="text" readonly maxlength="30" >
                </div>
            </div>
        </div>

    </div>
        <div class="row">
            <div class="col-sm-6">
                <div class="form-group">
                    <label class="col-sm-4 control-label ">双货位分组编码：</label>
                    <div class="col-sm-8">
                        <input name="group_coding_no"th:field="*{group_coding_no}" placeholder="请输入双货位分组编码" class="form-control" readonly type="text" maxlength="30" >
                    </div>
                </div>
            </div>
            <div class="col-sm-6">
                <div class="form-group">
                    <label class="col-sm-4 control-label">双货位分组编码：</label>
                    <div class="col-sm-8">
                        <input name="group_coding"th:field="*{group_coding}" id="group_coding" type="text" placeholder="请选择双货位分组编码" readonly class="form-control">
                    </div>
                </div>
            </div>
        </div>
        <div class="row">
            <div class="col-sm-6">
                <div class="form-group">
                    <label class="col-sm-4 control-label ">双货位标识：</label>
                    <div class="col-sm-8">
                        <input name="cargo_space_logo"th:field="*{cargo_space_logo}" placeholder="请输入双货位标识" class="form-control" readonly type="text" maxlength="30" >
                    </div>
                </div>
            </div>
            <div class="col-sm-6">
                <div class="form-group">
                    <label class="col-sm-4 control-label">本仓库区域：</label>
                    <div class="col-sm-8">
                        <select name="this_cargo_area" class="form-control m-b" th:field="*{this_cargo_area}" >
                            <option value="A">A</option>
                            <option value="B">B</option>
                        </select>
                    </div>
                </div>
            </div>
        </div>
        <div class="row">
            <div class="col-sm-6">
                <div class="form-group">
                    <label class="col-sm-4 control-label ">货位状态：</label>
                    <div class="col-sm-8">
                        <select name="status" class="form-control m-b" th:checked="${status == '1' ? '空货位' : '满货位'}" >
                            <option value="1">空货位</option>
                            <option value="2">满货位</option>
                        </select>
                    </div>
                </div>
            </div>
            <div class="col-sm-6">
                <div class="form-group">
                    <label class="col-sm-4 control-label is-required">是否锁定：</label>
                    <div class="col-sm-8">
                        <label class="toggle-switch switch-solid">
                            <input type="checkbox" id="locked"  th:checked="${locked == 'Y' ? '是' : '否'}" required>
                            <span></span>
                        </label>
                    </div>
                </div>
            </div>
        </div>
        <div class="row">
        <div class="col-sm-6">
            <div class="form-group">
                <label class="col-sm-4 control-label">是否双伸：</label>
                <div class="col-sm-8">
                    <select name="iss_double" class="form-control m-b" th:field="*{iss_double}" >
                        <option value="0">是</option>
                        <option value="1">否</option>
                    </select>
                </div>
            </div>
        </div>
        </div>
    </form>
</div>
<div class="row">
    <div class="col-sm-offset-5 col-sm-10">
        <button type="button" class="btn btn-sm btn-primary" onclick="submitHandler()"><i class="fa fa-check"></i>保 存
        </button>&nbsp;
        <button type="button" class="btn btn-sm btn-danger" onclick="closeItem()"><i class="fa fa-reply-all"></i>关 闭
        </button>
    </div>
</div>
<th:block th:include="include :: footer"/>
<th:block th:include="include :: select2-js"/>
<script type="text/javascript">
    var prefix = ctx + "device/basCargoSpace";


    function submitHandler() {

        	var data = $("#form-user-edit").serializeArray();
        	var locked = $("input[id='locked']").is(':checked') == true ? "Y" : "N";
        	data.push({"name": "locked", "value": locked});
        	$.operate.saveTab(prefix + "/edit", data);

    }

</script>
</body>
</html>